package com.kuang.gitpractice.pojo;

/**
 * @program: gitpractice
 * @description:
 * @author: 陈恩涛
 * @create: 2021-04-07 15:05
 **/
public class Car {

    public int age;

    public static void main(String[] args) {
        Car car1 = new Car();
        Car car2 = new Car();
        Car car3 = new Car();

        System.out.println(car1.hashCode());
        System.out.println(car2.hashCode());
        System.out.println(car3.hashCode());

        Class<? extends Car> aClass1 = car1.getClass();

        //sun.misc.Launcher$AppClassLoader@18b4aac2
        ClassLoader classLoader = aClass1.getClassLoader();
        //sun.misc.Launcher$ExtClassLoader@f6f4d33  jre\lib\ext
        System.out.println(classLoader.getParent());
        //null  1、不存在 2、java程序获取不到  rt.jar
        System.out.println(classLoader.getParent().getParent());

    }
}
